package com.tbryant.test.designpattern.cainiaocourse.singleton;

/**
 * 内部类式单例
 *
 * @author TBryant
 * @date 2021/9/7 17:47
 */
public class Singleton3 {
    private static class SingletonHolder {
        private static final Singleton3 INSTANCE = new Singleton3();
    }

    private Singleton3() {
    }

    public static final Singleton3 getInstance() {
        return SingletonHolder.INSTANCE;
    }
}
